#include    "USER_PROGRAM.H"  
#include		"BaseRef.H"

#define   LED_ON      		0
#define   LED_OFF     		1
#define   FULL      		0x10
#define   LOW               0x04
#define   EMPTY             0x01
#define   ErrorLEDTime      8000/10


void Display()
{
	if(LED_Status&0b00000001)
		PowerLed1=LED_ON;
	else
		PowerLed1=LED_OFF;
	if(LED_Status&0b00000010) 
		WifiLed1=LED_ON; 
	else
		WifiLed1=LED_OFF;
	if(Flag_IICFirstOn)
	{
		if(Flag_LiquidLow&&Flag_FloatKeyDown)  
		{
			FoamLed1=LED_OFF;
			FoamLed2=LED_ON;
			LiquidLevel=EMPTY;
		} 
		else if(Flag_FloatKeyDown&&(!Flag_LiquidLow))	
		{
			if(CNT_LedFlicker>0)
				FoamLed1=Flag_LedFlicker;
			else
				FoamLed1=LED_ON;
			FoamLed2=LED_OFF;
			LiquidLevel=LOW;
		}
		else
		{
			FoamLed1=LED_OFF;
			FoamLed2=LED_OFF;
			LiquidLevel=FULL;
		} 
	}	 
	if(Flag_PumpCurrentLow)	
	{
		if(CNT_ErrorLED<ErrorLEDTime)
		{
			FoamLed1=Flag_LedFlicker;
			FoamLed2=~Flag_LedFlicker;
			CNT_ErrorLED++;
		}
	
		else
		{	
			Flag_PumpCurrentLow=0;
			CNT_ErrorLED=0;
		}		
	}

}